package group.ocr.Mapper;

import group.ocr.pojo.image;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ImageMapper {
    @Insert("insert into images (title,font,author,image_url)values (#{title},#{font},#{author},#{url})")
    void saveImage(String title,String font,String author,String url);
    @Select("select * from images where id=#{id}")
    image selectById(int id);
    @Select("select * from images")
    List<image> selectAllImages();
    @Insert("insert into images (title, font, author, image_url,head_portrait,brief_introduction) values (#{title},#{font},#{author},#{image_url},#{head_portrait},#{brief_introduction})")
    void addImage(String title,String font,String author,String image_url,String head_portrait,String brief_introduction);
}
